﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SocialLearning
{
    public partial class UserDeleteForm : Form
    {
        #region Constructor

        /// <summary>
        /// Initializes a new instance of the <see cref="UserDeleteForm"/> class.
        /// </summary>
        public UserDeleteForm()
        {
            InitializeComponent();
        }

        #endregion

        #region Private Methods

        #endregion

        #region Private Controls

        /// <summary>
        /// Handles the Click event of the btnDelete control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(txtUserName.Text))
                MessageBox.Show("Please enter a user name", "Information",
                    MessageBoxButtons.OK, MessageBoxIcon.Information);
            else
            {
                UAC_UserManagement um = new UAC_UserManagement();
                um.Delete(txtUserName.Text);
            }
                
        }

        /// <summary>
        /// Handles the Click event of the btnCancel control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void btnCancel_Click(object sender, EventArgs e)
        {
            this .Close();
        }

        #endregion

    }
}
